﻿namespace hedefgrup.reports.renault.verbatim
{
    using System;
    using System.Data;

    public class verbatimInfo
    {
        private string content;
        private string dealerCode;
        private long id;
        private string iid;
        private string interviewee;
        private string make;
        private int month;
        private string project;
        private string questionCode;
        private string satisfaction;
        private int year;

        private verbatimInfo(long id, int month, int year, string dealerCode, string iid, string questionCode, string content, string make, string interviewee, string satisfaction, string project)
        {
            this.id = id;
            this.month = month;
            this.year = year;
            this.dealerCode = dealerCode;
            this.questionCode = questionCode;
            this.iid = iid;
            this.content = content;
            this.make = make;
            this.interviewee = interviewee;
            this.satisfaction = satisfaction;
            this.project = project;
        }

        public static verbatimInfo fromDataFileLine(string line)
        {
            string[] strArray = line.Split(new char[] { '\t' });
            return new verbatimInfo(0L, Convert.ToInt32(strArray[0]), Convert.ToInt32(strArray[1]), Convert.ToString(strArray[2]).Trim(), Convert.ToString(strArray[3]).Trim(), Convert.ToString(strArray[4]).Trim(), Convert.ToString(strArray[5]).Trim(), Convert.ToString(strArray[6]).Trim(), strArray[7].Trim(), strArray[8].Trim(), strArray[9].Trim());
        }

        private static verbatimInfo fromDataRow(DataRow row)
        {
            return new verbatimInfo(Convert.ToInt64(row["ID"]), Convert.ToInt32(row["AY"]), Convert.ToInt32(row["YIL"]), Convert.ToString(row["BAYII"]).Trim(), Convert.ToString(row["IID"]).Trim(), Convert.ToString(row["Question"]).Trim(), Convert.ToString(row["Content"]).Trim(), Convert.ToString(row["MARKA"]).Trim(), Convert.ToString(row["Interviewee"]).Trim(), Convert.ToString(row["Satisfaction"]).Trim(), Convert.ToString(row["Project"]).Trim());
        }

        public string Content
        {
            get
            {
                return this.content;
            }
        }

        public string DealerCode
        {
            get
            {
                return this.dealerCode;
            }
        }

        public long ID
        {
            get
            {
                return this.id;
            }
        }

        public string IID
        {
            get
            {
                return this.iid;
            }
        }

        public string Interviewee
        {
            get
            {
                return this.interviewee;
            }
        }

        public string Make
        {
            get
            {
                return this.make;
            }
        }

        public int Month
        {
            get
            {
                return this.month;
            }
        }

        public string Project
        {
            get
            {
                return this.project;
            }
        }

        public string QuestionCode
        {
            get
            {
                return this.questionCode;
            }
        }

        public string Satisfaction
        {
            get
            {
                return this.satisfaction;
            }
        }

        public int Year
        {
            get
            {
                return this.year;
            }
        }
    }
}

